package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    List<ShoppingCart> list(ShoppingCart shoppingCart);

    void update(ShoppingCart shoppingCart1);


    void insert(ShoppingCart shoppingCart);

    void deleteById(Long dishId,Long setmealId ,Long userId);

    @Delete("delete from shopping_cart where user_id = #{userId}")
    void cleanAll(Long userId);;
}
